package com.itheima.tliasmanagement.mapper;

import com.github.pagehelper.Page;
import com.itheima.tliasmanagement.entity.OperateLog;
import com.itheima.tliasmanagement.vo.OperateLogVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface OperateLogMapper {

    void insertOperateLog(OperateLog operateLog);

    //@Select("select l.*, e.name operateEmpName from operate_log l left join emp e on l.operate_user = e.id order by operate_time desc")
    @Select("select operate_log.*,emp.`name` as operateEmpName from operate_log LEFT JOIN emp ON operate_log.operate_user=emp.id")
    Page<OperateLog> pageQuery();
}